local filename = "getchargerecord.lua"

local skynet = require "skynet"
local filelog = require "filelog"
local redisdao = require "redisdao"
local timetool = require "timetool"

local json = require "cjson"
json.encode_sparse_array(true,1,1)

local service = nil
local CMD = {
	-- service = nil
}

-- 获取agent的充值记录（当日总充值数，充值限额）
function CMD.process( rid, ... )
	if not service then
	    service = CMD.service
	end

    local responsemsg = { }
    service.money = service.money or {}
    responsemsg.total_charge = tonumber(service.money.normal_charge) or 0
    result, result_data = redisdao.query_data(".gmmqredis", "get", "maxchargemoney")
    if result then
        responsemsg.max_chargemoney = tonumber(result_data) or 2000
    end

	return  responsemsg
end

return CMD